package crp.core.department.domain.models;

import com.qwlabs.auditing.AuditedEntity;
import crp.core.shared.LifecycleStatus;
import crp.core.shared.Tables;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Getter
@Setter
@Entity
@Table(name = Tables.DEPARTMENT)
public class DepartmentEntity extends AuditedEntity {
    @Id
    @GeneratedValue(generator = "UUID")
    @GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;
    private String code;
    private String name;
    @Enumerated(EnumType.STRING)
    private LifecycleStatus status;
}
